<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="../common/css/insert.css">
<title>Insert title here</title>
</head>
<body>
	<div id="searchInfo">
		<form id="searchBook" method="post" action="">
			<div class="form-group">
				<label>按ID删除：</label> <input class="form-control" id="idDelete"
					type="text" name="book_id" placeholder="输入图书id">
			</div>
			<div class="form-group">
				<label>按类型删除：</label> <input class="form-control" id="typeDelete"
					type="text" name="book_type" placeholder="输入图书类型">
			</div>
			<div class="form-group">
				<label>按书名删除：</label> <input class="form-control" id="nameDelete"
					type="text" name="book_name" placeholder="输入书名">
			</div>
			<div class="form-group">
				<label>按作者删除：</label> <input class="form-control" id="authorDelete"
					type="text" name="book_author" placeholder="输入作者名">
			</div>
			<div class="form-group">
				<label>按评星删除：</label> <input class="form-control" id="starDelete"
					type="text" name="book_star" placeholder="输入星数">
			</div>

			<input class="btn btn-primary" type="button" value="搜索"
				onclick="delete()"> <input class="btn btn-danger"
				type="reset" value="重置">
		</form>
	</div>
	<div id="searchResults">
	</div>
	
	
	<script>
	function delete(){
		var bookid=$('#idDelete').val();
		var type = $('#typeDelete').val();
		var name=$('#nameDelete').val();
		var author =$('#authorDelete').val();
		var star = $('#starDelete').val();
		var jo = {
			"bookid":bookid,
			"type":type,
			"name":name,
			"author":author,
			"star":star,
		};
		
		
		$(document).ready(function() {
			$.ajax({
				type : "post",
				url : "../searchBook.action",
				dataType : "json",
				data : jo,
				success : function(data,textStatus) {
					alert("删除成功");
				}
			});
		)};
	}
	</script>
</body>
</html>